<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>新增合伙人</title>
<meta name="viewport" content="width=100%, initial-scale=1.0, user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/lib/weix/style/weui.min.css">
<link rel="stylesheet" href="/css/fonts.css">
<link rel="stylesheet" href="/css/comm.css">
<link rel="stylesheet" href="/css/list_hej.css">
</head>

<body>
<div id="J_list">

</div>

<div class="weui-loadmore" id="J_loadmore" style="display:none;">
    <i class="weui-loading"></i>
    <span class="weui-loadmore__tips">正在加载</span>
</div>
<script src="/js/zepto.min.js"></script>
<script src="https://res.wx.qq.com/open/libs/weuijs/1.0.0/weui.min.js"></script>
<script src="/js/comm.js"></script>
<script type="text/javascript">
function getUserList(){
	var uid = '${uid}'
	var data = {page:1,rows:1000,uid:uid,returnType:1}
	var url = '/user/getUserListByUid'
	
	$('#J_loadmore').show();
	$.ajax({
		type: "POST",
		dataType: 'json',
		async: false,
		contentType: "application/json; charset=utf-8",
		data: JSON.stringify(data),
		url: url,
		success: function(res){
			if(res.code == 200){
				//操作
				var list = res.data.list;
				for(var i in list) {

					var shtml = '<div class="th-date__boxs"><div class="th-date__box J_date_box"><span class="tit max">'+i+'</span><span class="more max"></span></div></div>'+
								'<div class="weui-cells top_no lib">'
					var lists =  list[i]
					for (var j =0;j<lists.length;j++){
					shtml +=			'<div class="weui-cell weui-cell_access">'+
											'<a class="weui-cell__hd tb" style="color:#f52e00"  href="/userPage/getParter/'+lists[j]['id']+'"><i class="icon-partner "></i></a>'+
											'<a class="weui-cell__bd"  href="/userPage/getParter/'+lists[j]['id']+'">'+
												'<div class="th-info__tit">'+lists[j]['name']+'-'+lists[j]['role_name']+'</div>'+
												'<div class="th-info__fbt">获得<span class="red">'+lists[j]['point']+'</span>积分奖励</div>'+
												'<div class="th-info__time">'+lists[j]['addtime']+'</div>'+
											'</a>'+
											'<a class="weui-cell__ft max" style="color:#f52e00" href="/userPage/adduser?topen=3&id='+lists[j]['id']+'"><i class="icon-code"></i></a>'+
										'</div>'
					}
					shtml +=	'</div>'
					
					
					
					
					//var shtml ="<div>"+i;
//					var lists =  list[i];
//					for (var j =0;j<lists.length;j++){
//						shtml +="<li><div>"+lists[j]['name']+"-"+lists[j]['phone']+"-"+lists[j]['role_name']+"</div>";
//						if(lists[j]['point'] != 0){
//							shtml +="<div>+"+lists[j]['point']+"</div>";
//						}else{
//							shtml +="未绑定";
//						}
//						shtml +="</li>";
//					}
//					shtml += "</div>";
					
					
					
					
					
					
					
					

					$("#J_list").append(shtml);
				};

			}else{
				alert(res.msg);
			}
		},
		error: function(e){

		},
		complete: function(e){
			$('#J_loadmore').hide();
		}
	});

}

$(function(){	
	//当前时间
	var time = "${timestamp}";
	getUserList();
});
</script>
</body>
</html>